package com.yiqi.liebang.feature.mine.view.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.suozhang.framework.framework.AM;
import com.yiqi.liebang.R;
import com.yiqi.liebang.entity.bo.UserCenterBo;

public class EducationListAdapter extends BaseQuickAdapter<UserCenterBo.EducationAuthenticationBean, BaseViewHolder> {
    boolean isShow;

    public EducationListAdapter(boolean isShow) {
        super(R.layout.item_userinfo_jiaoyu_list);
        this.isShow = isShow;
    }

    @Override
    protected void convert(BaseViewHolder helper, UserCenterBo.EducationAuthenticationBean item) {
        helper.setVisible(R.id.btn_userinfo_education_edit, isShow)
                .setVisible(R.id.btn_userinfo_education_renzheng, isShow)
                .addOnClickListener(R.id.btn_userinfo_education_edit)
                .addOnClickListener(R.id.btn_userinfo_education_renzheng)
                .setVisible(R.id.iv_show_isrz,item.getStatus()==1?true:false)
                .setText(R.id.tv_edu_name, item.getSchoolName())
                .setText(R.id.tv_edu_desc, item.getEduDescribe())
                .setText(R.id.tv_edu_date, item.getBeginTime() + " - " + item.getEndTime() + " ," +
                        " " + item.getSubjectName() + " , " + item.getDiploma())
        ;
        AM.image().bindToCircleObject(item.getEduLogo(),helper.getView(R.id.iv_edu_logos));
    }
}
